﻿@model LanguageSelectorModel
@inject IWebHelper webHelper
@if (Model.AvailableLanguages.Count > 1)
{
    <li class="dropdown" id="header_inbox_bar" role="presentation">
        <a href="javascript:;" class="dropdown-toggle info-number" data-toggle="dropdown" aria-expanded="false">
            <i class="fa fa-language"></i>
        </a>
        <ul id="menu1" class="dropdown-menu dropdown-menu-right list-unstyled msg_list overflow-h" role="menu">
            @foreach (var lang in Model.AvailableLanguages)
            {
                <li>
                    <a href="@Url.Action("SetLanguage", "Home", new { langid = lang.Id, returnUrl = webHelper.GetRawUrl(Context.Request) })">
                        <img src="/content/images/flags/@(lang.FlagImageFileName)" alt="@lang.Name">
                        @lang.Name
                    </a>
                </li>
            }
        </ul>
    </li>
}